package cn.edu.nuc.thrid.model;

import java.util.List;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.NotEmpty;

public class User {
	private Integer zybuserid;

	@NotEmpty(message = "账号不能为空")
	@NotNull(message = "账号不能为空")
	// @Min(value=20)
	@Pattern(message = "账号长度不得超过20", regexp = "[a-zA-Z0-9]{0,19}")
	private String zybusername;
	@NotEmpty(message = "密码不能为空")
	@NotNull(message = "密码不能为空")
	// @Max(value = 20)
	@Pattern(message = "密码长度不得超过20", regexp = "[a-zA-Z0-9]{0,19}")
	private String zybuserpwd;

	/*@NotNull(message = "姓名不能为空")
	@Size(min = 0, max = 20, message = "姓名字数介于1-20")*/
	private String zybname;

	private String zybstate;

	private Double zybmoney;

	private String zybidentity;

	private String t2;

	private List<BuyMes> goods;

	public Integer getZybuserid() {
		return zybuserid;
	}

	public void setZybuserid(Integer zybuserid) {
		this.zybuserid = zybuserid;
	}

	public String getZybusername() {
		return zybusername;
	}

	public void setZybusername(String zybusername) {
		this.zybusername = zybusername;
	}

	public String getZybuserpwd() {
		return zybuserpwd;
	}

	public void setZybuserpwd(String zybuserpwd) {
		this.zybuserpwd = zybuserpwd;
	}

	public String getZybname() {
		return zybname;
	}

	public void setZybname(String zybname) {
		this.zybname = zybname == null ? null : zybname.trim();
	}

	public String getZybstate() {
		return zybstate;
	}

	public void setZybstate(String zybstate) {
		this.zybstate = zybstate == null ? null : zybstate.trim();
	}

	public Double getZybmoney() {
		return zybmoney;
	}

	public void setZybmoney(Double zybmoney) {
		this.zybmoney = zybmoney;
	}

	public String getZybidentity() {
		return zybidentity;
	}

	public void setZybidentity(String zybidentity) {
		this.zybidentity = zybidentity == null ? null : zybidentity.trim();
	}

	public String getT2() {
		return t2;
	}

	public void setT2(String t2) {
		this.t2 = t2 == null ? null : t2.trim();
	}

	public List<BuyMes> getGoods() {
		return goods;
	}

	public void setGoods(List<BuyMes> goods) {
		this.goods = goods;
	}

	@Override
	public String toString() {
		return "User [zybuserid=" + zybuserid + ", zybusername=" + zybusername + ", zybuserpwd=" + zybuserpwd
				+ ", zybname=" + zybname + ", zybstate=" + zybstate + ", zybmoney=" + zybmoney + ", zybidentity="
				+ zybidentity + ", t2=" + t2 + "]";
	}

}